var a = require("../../../../utils/themeSkin/skinBehavior"), t = getApp(), e = "plugin.store-alone-temp.frontend.businessCard.paging.tricks", s = "plugin.store-alone-temp.frontend.businessCard.paging.videos", r = {};

Page({
    behaviors: [ a ],
    data: {
        nav_show: 1,
        language: "",
        show1: !1,
        award: null,
        voice: "",
        playAudio: !1,
        custom_name: {
            love_name: "",
            point_name: ""
        },
        card_id: "",
        visit_id: "",
        cardData: {
            picture: []
        },
        areas: "",
        clickStatus: {},
        nums: {
            visit_statistics: {}
        },
        goods: [],
        cardType: "",
        shop_owner: {},
        level_name: "",
        store_name: "",
        actives: 0,
        supplier: null,
        good_page: 1,
        store_good: [],
        coupon_list: [],
        cardUrl: "",
        cardList_page: 1,
        cardList: [],
        showMore: !0,
        member: {},
        toolbar: !1,
        visit: 0,
        collection: 0,
        reliable: 0,
        visits: "/image/card_img_a.png",
        card_mobile: "/image/card_img_b.png",
        card_wechat: "/image/card_img_c.png",
        area_nameIcon: "/image/card_img_d.png",
        newClassification: {},
        isVideo: {},
        isArticle: {},
        area_name: "",
        active: 0,
        istapBtn: "intro",
        tapTitle: "intro",
        activitys1: [],
        activitys2: [],
        imgCount: 0,
        page: 0,
        aloneStyle: !1,
        openTemplate: 0
    },
    onLoad: function(a) {
        if (console.log("详情参数", a), a.card_id && this.setData({
            card_id: a.card_id
        }), a.scene) {
            var e = decodeURIComponent(a.scene);
            if (e) {
                var s;
                s = e.split(","), console.log(s, "切除"), this.setData({
                    card_id: s[0]
                }), this.setData({
                    mark: s[1]
                }), this.setData({
                    mark_id: s[2]
                }), s[3] && t._setMid(s[3]);
            }
        } else this.setData({
            card_id: a.card_id,
            mark: a.mark,
            mark_id: a.mark_id
        });
        1 == t.globalData.store_alone_temp ? (this.setData({
            aloneStyle: !0
        }), this.getCardDate(), this.getCardVideo(), this.getStoreCommunities()) : (this.getCardDate(), 
        this.getCardVideo(), this.getStoreCommunities(), this.getCardArticle(), this.getCardRoom());
    },
    toPages: function(a) {
        var t = this, e = a.target.dataset.url || a.currentTarget.dataset.url, s = a.target.dataset.type || a.currentTarget.dataset.type;
        console.log(a), wx.getStorage({
            key: "iconFrom",
            success: function(a) {
                a.data && (wx.navigateTo({
                    url: "/packageB/member/business_card/" + e + "/" + e + "?card_id=" + t.data.card_id + "&type=" + s
                }), console.log("/packageB/member/business_card/" + e + "/" + e + "?card_id=" + t.data.card_id + "&type=" + s));
            }
        }), this.setData({
            showcode: !1
        });
    },
    showTap: function() {
        this.setData({
            show2: !this.data.show2
        });
    },
    saveImgBtn: function(a) {
        wx.downloadFile({
            url: this.data.cardData.wechat_qrcode,
            success: function(a) {
                wx.saveImageToPhotosAlbum({
                    filePath: a.tempFilePath,
                    success: function(a) {
                        wx.showToast({
                            title: "保存成功",
                            icon: "none",
                            duration: 2e3
                        });
                    },
                    fail: function(a) {
                        "saveImageToPhotosAlbum:fail auth deny" === a.errMsg && (console.log("当初用户拒绝，再次发起授权"), 
                        wx.openSetting({
                            success: function(a) {
                                a.authSetting["scope.writePhotosAlbum"] ? wx.showToast({
                                    icon: "none",
                                    title: "获取权限成功,再次长按保存图片",
                                    duration: 1500
                                }) : wx.showToast({
                                    icon: "none",
                                    title: "获取权限失败,保存图片需要用户授权",
                                    duration: 1500
                                });
                            }
                        }));
                    },
                    complete: function(a) {
                        console.log(a);
                    }
                });
            }
        });
    },
    gopage: function(a) {
        var t = a.currentTarget.dataset.status, e = a.currentTarget.dataset.id, s = a.currentTarget.dataset.backid;
        1 == t ? wx.navigateTo({
            url: "/packageD/directSeeding/livePage/livePage?id=" + e + "&playerType=live"
        }) : 2 == t ? wx.navigateTo({
            url: "/packageD/directSeeding/livePage/livePage?id=" + e + "&playerType=video&backid=" + s
        }) : 3 == t && wx.navigateTo({
            url: "/packageD/directSeeding/foreshow/foreshow?id=" + e
        });
    },
    onReady: function() {
        var a = wx.getStorageSync("langIndex");
        this.setData({
            language: a.en
        });
    },
    onShow: function() {
        wx.showShareMenu({
            withShareTicket: !1,
            menus: [ "shareAppMessage", "shareTimeline" ]
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        console.log(this.data.active);
        if (console.log(this.data.page), "0" != this.data.active) if (console.log(this.data.current_page, this.data.last_page), 
        console.log(this.data.current_page >= this.data.last_page), this.data.current_page >= this.data.last_page) wx.hideLoading({}), 
        wx.showToast({
            title: "没有更多了",
            icon: "none"
        }); else {
            var a = this.data.page + 1;
            this.setData({
                page: a
            }), this.loadMorein(), console.log(this.data.isVideo);
        }
    },
    loadMorein: function() {
        var a, r = this;
        if ("2" == this.data.active) a = t.getNetAddresss(1 == t.globalData.store_alone_temp ? s : "plugin.business-card.frontend.controllers.card.paging.videos"); else if ("1" == this.data.active) a = t.getNetAddresss(1 == t.globalData.store_alone_temp ? e : "plugin.business-card.frontend.controllers.card.paging.tricks"); else if ("3" == this.data.active) a = t.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.articles"); else {
            if ("0" == this.data.active) return;
            "4" == this.data.active && (a = t.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.rooms"));
        }
        wx.showLoading({
            title: "加载中",
            icon: "none"
        }), t._postNetWork({
            url: a,
            data: {
                card_id: this.data.card_id,
                page: this.data.page
            },
            success: function(a) {
                var t = a.data;
                1 == t.result ? (console.log(t), 1 == r.data.active ? r.setData({
                    newClassification: r.data.newClassification.concat(t.data.data),
                    current_page: t.data.current_page,
                    last_page: t.data.last_page
                }) : 2 == r.data.active ? r.setData({
                    isVideo: r.data.isVideo.concat(t.data.data),
                    current_page: t.data.current_page,
                    last_page: t.data.last_page
                }) : 3 == r.data.active ? r.setData({
                    isArticle: r.data.isArticle.concat(t.data.data),
                    current_page: t.data.current_page,
                    last_page: t.data.last_page
                }) : 4 == r.data.active && (console.log(t), r.setData({
                    room: r.data.room.concat(t.data.data),
                    current_page: t.data.current_page,
                    last_page: t.data.last_page
                })), wx.hideLoading({})) : wx.showToast({
                    title: t.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getCardVideo: function() {
        var a = this, e = t.getNetAddresss(1 == t.globalData.store_alone_temp ? s : "plugin.business-card.frontend.controllers.card.paging.videos");
        t._postNetWork({
            url: e,
            data: {
                card_id: this.data.card_id,
                page: this.data.page
            },
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), a.setData({
                    isVideo: e.data.data,
                    current_page: e.data.current_page,
                    last_page: e.data.last_page
                })) : wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getStoreCommunities: function() {
        var a = this, s = t.getNetAddresss(1 == t.globalData.store_alone_temp ? e : "plugin.business-card.frontend.controllers.card.paging.tricks");
        t._postNetWork({
            url: s,
            data: {
                card_id: this.data.card_id,
                page: this.data.page
            },
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), a.setData({
                    newClassification: e.data.data,
                    current_page: e.data.current_page,
                    last_page: e.data.last_page
                })) : wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getCardArticle: function() {
        var a = this, e = t.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.articles");
        t._postNetWork({
            url: e,
            data: {
                card_id: this.data.card_id,
                page: this.data.page
            },
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), a.setData({
                    isArticle: e.data.data,
                    current_page: e.data.current_page,
                    last_page: e.data.last_page
                })) : wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getCardRoom: function() {
        var a = this, e = t.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.rooms");
        t._postNetWork({
            url: e,
            data: {
                card_id: this.data.card_id,
                page: this.data.page
            },
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), a.setData({
                    room: e.data.data,
                    current_page: e.data.current_page,
                    last_page: e.data.last_page
                })) : wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    onShareTimeline: function() {
        return {
            title: "".concat(this.data.cardData.card_name, "发给你名片"),
            query: "card_id=".concat(this.data.card_id, "&mark=").concat(this.data.mark, "&mark_id=").concat(this.data.mark_id)
        };
    },
    onShareAppMessage: function() {
        var a = "/packageB/member/business_card/BusinessCard/BusinessCard?card_id=" + this.data.card_id + "&mark=" + this.data.mark + "&mark_id=" + this.data.mark_id;
        return {
            title: this.data.cardData.card_name + "发给你名片",
            path: a,
            success: function(a) {
                wx.showToast({
                    title: "转发成功"
                });
            },
            fail: function(a) {
                wx.showToast({
                    title: "转发失败",
                    icon: "none"
                });
            }
        };
    },
    tip: function(a) {
        wx.showModal({
            title: "提示",
            content: a,
            showCancel: !1
        });
    },
    toCardVisit: function() {
        this.triggerAction("3"), wx.navigateTo({
            url: "/packageB/member/business_card/CardVisit/CardVisit?card_id=" + this.data.card_id
        });
    },
    toPage: function(a) {
        var t = a.target.dataset.url || a.currentTarget.dataset.url;
        "hotelApply" != t ? wx.navigateTo({
            url: "/packageA/member/" + t + "/" + t
        }) : wx.navigateTo({
            url: "/packageA/member/storeApply/storeApply?name=hotelApply"
        });
    },
    toGood: function(a) {
        var t = a.target.dataset.item || a.currentTarget.dataset.item, e = this.options.card_id || this.data.mark_id;
        wx.navigateTo({
            url: "/packageA/detail_v2/detail_v2?id=" + t.id + "&mark=card&mark_id=" + e
        });
    },
    toShop: function(a) {
        var t = a.target.dataset.id || a.currentTarget.dataset.id, e = a.target.dataset.url || a.currentTarget.dataset.url;
        "hotel" === e ? wx.navigateTo({
            url: "/packageC/hotel/HotelHome/HotelHome?id=" + t
        }) : "store" === e ? wx.navigateTo({
            url: "/packageC/o2o/HomeSeller/HomeSeller?store_id=" + t
        }) : "supplier" === e && wx.navigateTo({
            url: "/packageA/member/supplier/SupplierShop/SupplierShop?id=" + t
        });
    },
    toBuy: function(a) {
        var t = a.target.dataset.id || a.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/packageC/cashier/cashier_pay/cashier_pay?store_id=" + t
        });
    },
    getGoods: function() {
        var a = this, e = "";
        if ("supplier" === this.data.cardType) e = "plugin.business-card.frontend.controllers.card.card.getSupplierGoods"; else {
            if ("shop_owner" !== this.data.cardType && "clerk" !== this.data.cardType) return;
            e = "plugin.business-card.frontend.controllers.card.card.getStoreGoods";
        }
        var s = t.getNetAddresss(1 == t.globalData.store_alone_temp ? "plugin.store-alone-temp.frontend.businessCard.card.getStoreGoods" : e);
        s = s + "&page=" + this.data.good_page + "&card_id=" + this.data.card_id, t._getNetWork({
            url: s,
            success: function(t) {
                var e = t.data;
                if (1 == e.result) {
                    var s = a.data.store_good.concat(e.data.data);
                    a.setData({
                        store_good: s
                    }), e.data.current_page >= e.data.last_page ? a.setData({
                        showMore: !1
                    }) : a.setData({
                        showMore: !0
                    });
                } else wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getList: function() {
        var a = this, e = t.getNetAddresss(this.data.cardUrl);
        e += "&page=" + this.data.cardList_page, e += "&card_id=" + this.data.card_id, t._getNetWork({
            url: e,
            success: function(t) {
                var e = t.data;
                if (1 == e.result) {
                    var s = a.data.cardList.concat(e.data.data);
                    a.setData({
                        cardList: s
                    }), e.data.current_page >= e.data.last_page ? a.setData({
                        showMore: !1
                    }) : a.setData({
                        showMore: !0
                    }), e.data.hasOwnProperty("store_list_style") && a.setData({
                        openTemplate: e.data.store_list_style || 0
                    });
                } else wx.showToast({
                    title: e.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    playAmr: function() {
        console.log(this.data.voice, "路径"), t._isTextEmpty(this.data.voice) ? wx.showToast({
            title: "请先去录音",
            icon: "none"
        }) : (this.innerAudioContext.src = this.data.voice, this.innerAudioContext.play());
    },
    loadMore: function(a) {
        var t = a.target.dataset.item || a.currentTarget.dataset.item;
        if ("good" === t) {
            var e = this.data.good_page;
            e++, this.setData({
                good_page: e
            }), this.getGoods();
        } else if ("list" === t) {
            var s = this.data.cardList_page;
            s++, this.setData({
                cardList_page: s
            }), this.getList();
        }
    },
    triggerAction: function(a) {
        var e = t.getNetAddresss("plugin.business-card.frontend.controllers.action.card-pre-action.index");
        e += "&card_type=" + a + "&card_id=" + this.data.card_id, t._getNetWork({
            url: e,
            success: function(a) {
                var t = a.data;
                if (1 == t.result) {
                    var e = this.cardList.concat(t.data.data);
                    this.setData({
                        cardList: e
                    }), t.data.current_page >= t.data.last_page ? this.setData({
                        showMore: !1
                    }) : this.setData({
                        showMore: !0
                    });
                } else wx.showToast({
                    title: t.msg,
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    copyText: function(a) {
        var t = a.currentTarget.dataset.text;
        wx.setClipboardData({
            data: t,
            success: function(a) {
                wx.getClipboardData({
                    success: function(a) {
                        wx.showToast({
                            title: "复制成功"
                        });
                    }
                });
            }
        });
    },
    onCopy: function() {
        var a = this;
        "" != this.data.cardData.card_name ? wx.getStorage({
            key: "iconFrom",
            success: function(t) {
                wx.addPhoneContact({
                    firstName: a.data.cardData.card_name,
                    mobilePhoneNumber: a.data.cardData.card_mobile,
                    weChatNumber: a.data.cardData.card_wechat,
                    photoFilePath: t.data.card_avatar,
                    addressState: a.data.addressState,
                    addressCity: a.data.addressCity,
                    addressStreet: a.data.addressStreet,
                    success: function(a) {
                        wx.showToast({
                            title: "保存成功"
                        });
                    }
                });
            }
        }) : wx.showToast({
            title: "请去编辑姓名",
            icon: "none"
        });
    },
    changeLike: function(a) {
        var e = this, s = a.target.dataset.index || a.currentTarget.dataset.index, r = t.getNetAddresss("plugin.business-card.frontend.controllers.action.card-action.index");
        r += "&card_id=" + this.data.card_id + "&card_type=" + s, t._getNetWork({
            url: r,
            success: function(a) {
                var t = a.data;
                1 == t.result ? "1" === s ? e.setData({
                    "clickStatus.collected": t.data
                }) : e.setData({
                    "clickStatus.reliabled": t.data
                }) : wx.showToast({
                    title: "不能给自己点赞",
                    icon: "none"
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    loadNext: function(a) {
        console.log(a.currentTarget.dataset.tap), "intro" == a.currentTarget.dataset.tap && (this.setData({
            isintro: !0
        }), console.log(this.data.cardData.picture.length));
    },
    tabChange: function(a) {
        console.log(a.detail), this.setData({
            isintro: !1,
            active: a.detail.index,
            page: 1,
            current_page: 1
        });
    },
    chooseTabchange: function(a) {
        this.chooseTab(a.detail.title);
    },
    chooseTab: function(a) {
        if ("staff" == this.data.cardType) "供应商" == a ? this.setData({
            cardUrl: "plugin.business-card.frontend.controllers.card.card.getStaffSupplier"
        }) : "门店" == a ? this.setData({
            cardUrl: "plugin.business-card.frontend.controllers.card.card.getStaffStore"
        }) : "酒店" == a && this.setData({
            cardUrl: "plugin.business-card.frontend.controllers.card.card.getStaffHotel"
        }); else {
            if ("center" != this.data.cardType) return;
            "供应商" == a ? this.setData({
                cardUrl: "plugin.business-card.frontend.controllers.card.card.getCenterSupplier"
            }) : "门店" == a ? this.setData({
                cardUrl: "plugin.business-card.frontend.controllers.card.card.getCenterStore"
            }) : "酒店" == a && this.setData({
                cardUrl: "plugin.business-card.frontend.controllers.card.card.getCenterHotel"
            });
        }
        this.setData({
            cardList_page: 1,
            showMore: !0,
            cardList: []
        }), this.getList();
    },
    getCardDate: function() {
        var a = this, e = t.getNetAddresss(1 == t.globalData.store_alone_temp ? "plugin.store-alone-temp.frontend.businessCard.card.sendCardByRoleId" : "plugin.business-card.frontend.controllers.card.card.sendCardByRoleId");
        e += "&card_id=" + this.data.card_id + "&visit_id=" + this.data.visit_id + "&mark=" + this.data.mark + "&mark_id=" + this.data.mark_id, 
        t._getNetWork({
            url: e,
            success: function(e) {
                var s = e.data;
                if (1 == s.result) {
                    var r, i, o, d, n, c, l, g, u;
                    a.setData({
                        nav_show: s.data.nav_show,
                        allData: s.data,
                        cardData: s.data.card,
                        award: s.data.award,
                        member: s.data.result.member,
                        voice: s.data.card.voice,
                        banner: s.data.banner,
                        shop_name: s.data.shop_name,
                        is_trick: s.data.is_trick,
                        is_video: s.data.is_video,
                        is_article: s.data.is_article,
                        is_room: s.data.is_room
                    });
                    var p = wx.getStorageSync("iconFrom").background;
                    if (a.saveImg(p), a.data.cardData.picture.length < 2 && a.setData({
                        isintro: !0
                    }), t._isTextEmpty(s.data.card.voice) || "-1" != s.data.card.voice.indexOf("amr") ? a.setData({
                        voiceShow: !1
                    }) : a.setData({
                        voiceShow: !0
                    }), a.data.voice, !a.data.member.member && a.data.member.name) {
                        var h = a.data.member.name.level_name;
                        a.setData({
                            level_name: h
                        });
                    } else {
                        var m = a.data.cardData.level_name;
                        a.setData({
                            level_name: m
                        });
                    }
                    if (a.data.award && a.setData({
                        show1: !0,
                        custom_name: s.data.result.member.custom_name
                    }), null == s.data.card.address && (s.data.card.address = ""), a.data.cardData.areas[0]) {
                        null == a.data.cardData.areas[3] && (a.data.cardData.areas[3] = "");
                        var _ = a.data.cardData.areas[0] + a.data.cardData.areas[1] + a.data.cardData.areas[2] + a.data.cardData.areas[3] + s.data.card.address;
                        a.setData({
                            areas: _
                        }), a.setData({
                            addressState: a.data.cardData.areas[0],
                            addressCity: a.data.cardData.areas[1] + a.data.cardData.areas[2],
                            addressStreet: a.data.cardData.areas[3] + s.data.card.address
                        });
                    }
                    a.setData({
                        visit: null === (r = s.data.result.member) || void 0 === r || null === (i = r.achievement) || void 0 === i || null === (o = i.visit_statistics) || void 0 === o ? void 0 : o.visit,
                        collection: null === (d = s.data) || void 0 === d || null === (n = d.card) || void 0 === n || null === (c = n.card_statistics) || void 0 === c ? void 0 : c.collection,
                        reliable: null === (l = s.data) || void 0 === l || null === (g = l.card) || void 0 === g || null === (u = g.card_statistics) || void 0 === u ? void 0 : u.reliable
                    }), a.setDatas(s.data.result.member), 1 == s.data.result.member.is_supplier ? a.chooseTab("供应商") : 1 == s.data.result.member.is_store ? a.chooseTab("门店") : 1 == s.data.result.member.is_hotel && a.chooseTab("酒店"), 
                    a.getGoods(), a.setData({
                        visit_id: s.data.result.member.self,
                        clickStatus: s.data.result.member.status,
                        nums: s.data.result.member.achievement,
                        goods: s.data.result.member.goods
                    });
                    var f = {};
                    t._isTextEmpty(s.data.card.level_name) && (s.data.card.level_name = ""), f.card_name = s.data.card.card_name, 
                    f.card_mobile = s.data.card.card_mobile, f.card_wechat = s.data.card.card_wechat, 
                    f.area_name = a.data.areas, f.visit = "人气" + (s.data.card.card_statistics.visit + 1), 
                    f.card_name = s.data.card.card_name + "名片码", f.shop_name = "名片由【".concat(s.data.shop_name, "】生成"), 
                    f.role_name = s.data.card.role_name + "|" + s.data.card.level_name, wx.setStorage({
                        key: "info",
                        data: f
                    });
                } else wx.showToast({
                    title: s.msg,
                    icon: "none"
                }), setTimeout(function() {
                    wx.reLaunch({
                        url: "/packageG/index/index"
                    });
                }, 2e3);
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    setDatas: function(a) {
        a.member ? this.setData({
            cardType: "member"
        }) : a.team_dividend ? this.setData({
            cardType: "team_dividend"
        }) : a.commission ? this.setData({
            cardType: "commission"
        }) : a.staff ? this.setData({
            cardType: "staff"
        }) : a.center ? this.setData({
            cardType: "center"
        }) : a.area_dividend ? (this.setData({
            cardType: "area_dividend"
        }), a.name ? this.setData({
            level_name: a.name.level_name
        }) : this.setData({
            level_name: a.area_dividend.level_name
        })) : a.supplier ? (this.setData({
            cardType: "supplier",
            supplier: a.supplier
        }), a.name ? this.setData({
            level_name: a.name.level_name
        }) : this.setData({
            level_name: a.supplier.store_name
        })) : a.shop_owner ? this.setData({
            cardType: "shop_owner",
            store_name: a.shop_owner.store_name,
            shop_owner: a.shop_owner,
            coupon_list: a.coupon
        }) : a.clerk && this.setData({
            cardType: "clerk",
            store_name: a.clerk.store_name,
            coupon_list: a.coupon
        });
    },
    closeCneter: function() {
        this.setData({
            show1: !1
        });
    },
    showToolbar: function(a) {
        this.setData({
            toolbar: !this.data.toolbar
        });
    },
    toxiangq: function(a) {
        if (console.log(a), "postMy" == a.currentTarget.dataset.name) {
            var t = a.currentTarget.dataset.item.id;
            wx.navigateTo({
                url: "/packageC/micro_communities/microCommentDetails/microCommentDetails?stickId=" + t
            });
        }
        if ("video" == a.currentTarget.dataset.name) {
            var e = a.currentTarget.dataset.item.id;
            wx.navigateTo({
                url: "/packageC/video_goods/VideoDetail/VideoDetail?vid=" + e + "&page=1"
            });
        }
        if ("text" == a.currentTarget.dataset.name) {
            var s = a.currentTarget.dataset.item.id;
            wx.navigateTo({
                url: "/packageA/member/article/articleContent/articleContent?article_id=" + s
            });
        }
    },
    goTohome: function(a) {
        wx.reLaunch({
            url: "/packageG/index/index"
        });
    },
    toolCard: function() {
        wx.navigateTo({
            url: "/packageB/member/business_card/CardCenter/CardCenter"
        });
    },
    callMobile: function() {
        wx.makePhoneCall({
            phoneNumber: this.data.cardData.card_mobile,
            success: function(a) {
                console.log(a, "成功");
            },
            fail: function(a) {
                console.log(a, "失败");
            }
        });
    },
    saveImg: function(a) {
        var e = this;
        wx.getImageInfo({
            src: this.data.visits,
            success: function(a) {
                e.setData({
                    visits: a.path
                }), r.visit = e.data.visits, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {
                console.log(a, "错误的回调1");
            }
        }), wx.getImageInfo({
            src: this.data.card_mobile,
            success: function(a) {
                e.setData({
                    card_mobile: a.path
                }), r.card_mobile = e.data.card_mobile, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {
                console.log(a, "错误的回调2");
            }
        }), wx.getImageInfo({
            src: this.data.card_wechat,
            success: function(a) {
                e.setData({
                    card_wechat: a.path
                }), r.card_wechat = e.data.card_wechat, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {
                console.log(a, "错误的回调3");
            }
        }), wx.getImageInfo({
            src: this.data.area_nameIcon,
            success: function(a) {
                e.setData({
                    area_nameIcon: a.path
                }), r.area_nameIcon = e.data.area_nameIcon, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {
                console.log(a, "错误的回调4");
            }
        }), t._isTextEmpty(this.data.cardData.card_avatar) || wx.downloadFile({
            url: this.data.cardData.card_avatar,
            success: function(a) {
                e.setData({
                    "cardData.card_avatar": a.tempFilePath
                }), r.card_avatar = a.tempFilePath;
            },
            fail: function(a) {}
        }), t._isTextEmpty(this.data.banner) || wx.downloadFile({
            url: this.data.banner,
            success: function(t) {
                e.setData({
                    banner: t.tempFilePath
                }), r.background = a || t.tempFilePath, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {}
        }), wx.downloadFile({
            url: this.data.cardData.min_code,
            success: function(a) {
                e.setData({
                    "cardData.min_code": a.tempFilePath
                }), console.log(a.tempFilePath), r.min_code = a.tempFilePath, wx.setStorage({
                    key: "iconFrom",
                    data: r
                });
            },
            fail: function(a) {
                console.log(a, "错误的回调");
            }
        });
    }
});